<div class="properties clear">
	<h2>{$actualPage.title}</h2>
	<form action="#" method="post">
	<p>
		<select name="sorting" class="sort">
			<option{if !$actualState.sorting || ($actualState.sorting == 'cena' && $actualState.way == 'asc')} selected="selected"{/if} value="cena-vzostupne" data-url="{$actualUrlWithoutGetParameters}?sorting=cena&amp;way=asc{if $actualState.price_from}&amp;price_from={$actualState.price_from}{/if}{if $actualState.price_to}&amp;price_to={$actualState.price_to}{/if}{if $actualState.area_from}&amp;area_from={$actualState.area_from}{/if}{if $actualState.area_to}&amp;area_to={$actualState.area_to}{/if}">Cena vzostupne</option>
			<option{if $actualState.sorting == 'cena' && $actualState.way == 'desc'} selected="selected"{/if} value="cena-zostupne" data-url="{$actualUrlWithoutGetParameters}?sorting=cena&amp;way=desc{if $actualState.price_from}&amp;price_from={$actualState.price_from}{/if}{if $actualState.price_to}&amp;price_to={$actualState.price_to}{/if}{if $actualState.area_from}&amp;area_from={$actualState.area_from}{/if}{if $actualState.area_to}&amp;area_to={$actualState.area_to}{/if}">Cena zostupne</option>
			<option{if $actualState.sorting == 'datum' && $actualState.way == 'asc'} selected="selected"{/if} value="najstarsie" data-url="{$actualUrlWithoutGetParameters}?sorting=datum&amp;way=asc{if $actualState.price_from}&amp;price_from={$actualState.price_from}{/if}{if $actualState.price_to}&amp;price_to={$actualState.price_to}{/if}{if $actualState.area_from}&amp;area_from={$actualState.area_from}{/if}{if $actualState.area_to}&amp;area_to={$actualState.area_to}{/if}">Najstaršie</option>
			<option{if $actualState.sorting == 'datum' && $actualState.way == 'desc'} selected="selected"{/if} value="najnovsie" data-url="{$actualUrlWithoutGetParameters}?sorting=datum&amp;way=desc{if $actualState.price_from}&amp;price_from={$actualState.price_from}{/if}{if $actualState.price_to}&amp;price_to={$actualState.price_to}{/if}{if $actualState.area_from}&amp;area_from={$actualState.area_from}{/if}{if $actualState.area_to}&amp;area_to={$actualState.area_to}{/if}">Najnovšie</option>
		</select>
	</p>
	</form>
</div>		
<!--PROPERTY LIST-->
<div class="listings">
	{foreach from=$realityList item='reality'}
		<div class="list">
			{if $reality.main_image}
				<div class="img">
					<a href="{$reality.url}" title="{$reality.title}">
						{image src=$reality.mainImage width=236 height=159 alt=$reality.title}
					</a>
				</div>
			{/if}
					
			<div class="desc">
				<h4><a href="{$reality.url}" title="{$reality.title}">{$reality.title}</a></h4>
				{if $reality.street || $reality.fk_city_id}<span class="address">{$reality.street}{if $reality.fk_city_id}{if $reality.street}, {/if}{$reality.city.title}{/if}</span>{/if}
				{if $reality.short_description}<p>{$reality.short_description}</p>{/if}
				<label><strong>Pridané:</strong> {$reality.crdate|date_format:'%e.%m. %Y'}</label>
				{if $reality.fk_agent_id}<label><strong>Agent:</strong> {$reality.agent.name}</label>{/if}
				{if $reality.area}<label><strong>Výmera:</strong> {$reality.area} m<sup>2</sup></label>{/if}
				{if $reality.price}<span class="price">&euro; {$reality.price|format_number}</span>{/if}
			</div>
		</div>
	{/foreach}
</div>
{if $pageCount > 1}
	<!--NAVIGATION-->
	<div class="pagination clear">
		<ul>
			<li><span>Strana {$page} / {$pageCount}</span></li>
			{foreach from=$pages item='pagerPage'}
				<li><a href="{$actualState.id}/strana-{$pagerPage}.html?{if $actualState.sorting}sorting={$actualState.sorting}&amp;{/if}{if $actualState.way}way={$actualState.way}&amp;{/if}{if $actualState.price_from}price_from={$actualState.price_from}&amp;{/if}{if $actualState.price_to}price_to={$actualState.price_to}&amp;{/if}{if $actualState.area_from}area_from={$actualState.area_from}&amp;{/if}{if $actualState.area_to}area_to={$actualState.area_to}{/if}"{if $page == $pagerPage} class="active"{/if} title="Strana {$pagerPage}">{$pagerPage}</a></li>
			{/foreach}
		</ul>
	</div>
{/if}